﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

namespace WF_Loadout_Editor
{
    public enum PolarityType
    {
        attackType = 0,
        defenseType,    // 1
        tacticType,     // 2
        powerType,      // 3
        preceptType,    // 4
        None            // 5
    }

    public class Polarity
    {
        private PolarityType type;
        public PolarityType Type
        {
            get { return type; }
            set { type = value; }
        }

        private int slot;
        public int Slot
        {
            get { return slot; }
            set { slot = value; }
        }

        private List<Image> picture;
        public List<Image> Picture
        {
            get { return picture; }
            set { picture = value; }
        }

        private int currentPicture;
        public int CurrentPicture
        {
            get { return currentPicture; }
            set { currentPicture = value; }
        }

        public Polarity(int type1, int slot1)
        {
            type = (PolarityType)type1;
            slot = slot1;
            picture = new List<Image>();
            currentPicture = 0;

            switch (type)
            {
                case PolarityType.attackType:
                    picture.Add(Image.FromFile("Resources/Polarities/Attack.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/AttackB.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/AttackR.png"));
                    break;
                case PolarityType.defenseType:
                    picture.Add(Image.FromFile("Resources/Polarities/Defense.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/DefenseB.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/DefenseR.png"));
                    break;
                case PolarityType.tacticType:
                    picture.Add(Image.FromFile("Resources/Polarities/Tactic.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/TacticB.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/TacticR.png"));
                    break;
                case PolarityType.powerType:
                    picture.Add(Image.FromFile("Resources/Polarities/Power.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/PowerB.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/PowerR.png"));
                    break;
                case PolarityType.preceptType:
                    picture.Add(Image.FromFile("Resources/Polarities/Precept.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/PreceptB.png"));
                    picture.Add(Image.FromFile("Resources/Polarities/PreceptR.png"));
                    break;
                default:
                    picture = null;
                    break;
            }
        }
    }
}
